<template>
    <div class="block">
     <el-pagination
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
       :current-page="currentPage"
       :page-sizes="[5, 10, 15, 20]"
       :page-size="pageSize"
       layout="total, sizes, prev, pager, next, jumper"
       :total="total">
     </el-pagination>
   </div>
 </template>
 
 <script>
 export default {
   props:['total','pageSize','currentPage'],
   methods: {
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`);
         this.$emit('changeSize',val)
       },
       handleCurrentChange(val) {
         console.log(`当前页: ${val}`);
         this.$emit('changePage',val)
       }
     },
     data() {
       return {
         currentPage1: 5,
         currentPage2: 5,
         currentPage3: 5,
         currentPage4: 4
       };
     }
 }
 </script>
 
 <style>
 
 </style>